import java.util.Arrays;
import java.util.Scanner;

public class Test {

    //Java中没有函数声明这一说
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();

        System.out.println(a);
    }

    //Java所有的数组都是对象
    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        System.out.println(s);
    }

    //数组拷贝 - 深拷贝(方法一)
    public static void main3(String[] args) {
        int[] array = {1, 2, 3, 4, 5};
        int[] array2 = new int[array.length];

        for (int i = 0; i < array.length; i++) {
            array2[i] = array[i];
        }
    }

    //数组拷贝(方法二)
    public static void main(String[] args) {
        int[] array = {1, 2, 3, 4, 5};
        int[] array2 = Arrays.copyOf(array, 2 * array.length);

        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.toString(array2));
    }
}
